<?php

class Question extends Item {
	protected $answerList = NULL;

	public function getAnswers() {
		if ($this->answerList === NULL) {
			$answerRepository = new AnswerRepository();
			$answerRepository->setOrderBy(array('sorting' => 'asc'));
			$this->answerList = $answerRepository->getByFkQuestionId($this['uid']);
		}
		return $this->answerList;
	}
}

?>